@extends('Home.layout')
@section('content')
@if(session('info'))
    <span id="info" class="text-red">{{session('info')}}</span>
@endif

<link href="{{ asset('/css/normalize.css') }}" rel="stylesheet"/>
<link href="{{ asset('/css/jquery-ui.css') }}" rel="stylesheet"/>
<link href="{{ asset('/css/jquery.idealforms.min.css') }}" rel="stylesheet" media="screen"/>
<script src="{{ asset('/js/timeline.js') }}"></script>
<style type="text/css">
body{font:normal 15px/1.5 Arial, Helvetica, Free Sans, sans-serif;color: #222;background:url(pattern.png);overflow-y:scroll;padding:60px 0 0 0;}
#my-form{width:755px;margin:0 auto;border:1px solid #ccc;padding:3em;border-radius:3px;box-shadow:0 0 2px rgba(0,0,0,.2);}
#comments{width:350px;height:100px;}
</style>

</head>
<body>


<div class="row">

  <div class="eightcol last">

    <!-- Begin Form -->

    <form id="my-form" action="{{ url('/Home/doadd') }}" method="post" enctype="multipart/form-data">
    {{ csrf_field() }}
        <section name="{{ session()->get('master') -> hd_name }}">

          <div><label>留言标题:</label><input id="username" name="tip"   type="text"   placeholder="留言标题" /></div>
          <div><label>留言内容:</label><textarea placeholder="留言内容" name="content" id="username"></textarea></div>
        </section>
      <div><hr/></div>
      <div>
        <button type="submit">提交</button>
        <button id="reset" type="button">重置</button>
      </div>
    </form>
    <!-- End Form -->
  </div>
</div>
<script type="text/javascript" src="{{ asset('/js/jquery-1.8.2.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/js/jquery-ui.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/js/jquery.idealforms.js') }}"></script>
<script type="text/javascript">
var options = {

    onFail: function(){
        alert( $myform.getInvalid().length +' invalid fields.' )
    },

    inputs: {

        }
};

var $myform = $('#my-form').idealforms(options).data('idealforms');

$('#reset').click(function(){
    $myform.reset().fresh().focusFirst()
});

$myform.focusFirst();
</script>
<div style="text-align:center;">
<p style = "color:#ccc;">请发布个人留言</p>
</div>
@endsection